import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a= scanner.nextInt();
        int b=scanner.nextInt();
        int max=a>b?a:b;
        int min=a<b?a:b;
        int c=max;
        int d=min;
        while(true) {

            while(min<=max) {
                min+=d;
                if(min==max) {
                    System.out.println(min);
                    return;
                }
            }
            max+=c;
        }
    }
}
